<template>
	<view class="news">
		<view class="tab-box">
			<u-tabs :list="tabs" @click="onClick" lineColor="#6fb666"></u-tabs>
		</view>
		<view class="interact" v-if="currentIndex == 0">
			<u-empty style="margin-top: 200rpx;" mode="data" width="200" height="200"
				icon="http://cdn.uviewui.com/uview/empty/data.png" text="暂无消息">
			</u-empty>
		</view>
		<view class="notice" v-else>
			<u-empty style="margin-top: 200rpx;" mode="data" width="200" height="200"
				icon="http://cdn.uviewui.com/uview/empty/data.png" text="暂无通知">
			</u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabs: [{
					name: '互动'
				}, {
					name: '通知'
				}],
				currentIndex: 0
			};
		},
		methods: {
			onClick(e) {
				console.log(e);
				this.currentIndex = e.index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.news {
		.tab-box {
			position: fixed;
			background-color: #fff;
			display: flex;
			justify-content: center;
			top: 0;
			width: 100%;
			z-index: 5;
		}

		.interact,
		.notice {
			margin-top: 110rpx;
		}
	}
</style>
